/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package motiveai.tests;

import motiveai.annotation.DurationOfBehaviour;
import motiveai.components.Agent;
import motiveai.components.BehaviourEntity;
import motiveai.factors.Environment;

/**
 *
 * @author oxplay
 */
public class Test1KillEnemy extends BehaviourEntity<Agent> {

    public Test1KillEnemy() {
    }

    public boolean canBeUsed(Agent agent, Environment environment) {
        return true;
    }

    @Override
    @DurationOfBehaviour(duration = 1f)
    public float behave(Agent agent, Environment environment) {
        environment.setBooleanFactor("isEnemyNear", false);
        environment.setBooleanFactor("needARest", true);
        return 0;
    }
};
